<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>



<div align="center">

<c:if test="${ not empty model.chengbanOrgInfoId}">
	<span style='font-size:12.0pt;font-family:宋体;font-weight:bold'>承办部门：<s:property value="#orgInfoManager.getById(model.chengbanOrgInfoId).orgName" /></span><br /><br />
</c:if>
<c:if test="${ not empty model.attaName && not empty model.attaFileName}">
	<span style='font-size:12.0pt;font-family:宋体;font-weight:bold'>工单附件：<a href="${ctx}/tszb/atta-files/${model.attaFileName}">${model.attaName }</a></span><br /><br />
</c:if>
<c:if test="${isApproveTask }">
<div id="tabs" style="width:800px;height:360px;" class="easyui-tabs">
<div title="批准延时申请"" style="padding:20px;" icon="icon-save">
工单延时天数：<input name="delayDays" id="delayDays" class="easyui-numberspinner" value="${ model.delayDays}" min="0" required="true" style="width:50px;"></input><br/><br/>
工单延时原因：${model.delayReason } <br/>
<input type="button" value="批准工单延时" onclick="approveWorkOrderDelay();"/>
</div>
</div>
</c:if>
<c:if test="${!isViewTask }">
<div id="tabs" style="width:800px;height:400px;" class="easyui-tabs">
<c:if test="${model.currActName=='bzcs' || model.currActName=='xtdbsh' || model.currActName=='zgzrsd'}">
<div title="修改投诉内容"" style="padding:0px;" icon="icon-save">
<s:textarea rows="15" cols="74"  key="activityInfo.incomingCallContent"  cssClass="incomingCallContentTextarea" required="false" theme="simple" value="%{model.incomingCallContent}"></s:textarea>
<c:if test="${model.currActName=='bzcs' || model.currActName=='xtdbsh' }">
<div class="gridTable">
		<table width="100%"  border="0" cellspacing="0" class="gridBody">
		  <thead>
			  <tr>
				<th sortColumn="IS_ADMINISTRATOR" >评分项目</th>
				<th sortColumn="IS_ADMINISTRATOR" >评分细项</th>
				<th sortColumn="STATUS" >分数</th>
				<th sortColumn="STATUS" >分数选择</th>
				<th sortColumn="STATUS" >解释</th>
			 </tr>
		  </thead>
		  <tbody>
		  	  <c:forEach items="${gradeItems}" var="item" varStatus="status">
			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
				<td><c:out value='${item.gradeItemName}'/>&nbsp;</td>
				<td><c:out value='${item.gradeTermName}'/>&nbsp;</td>
				<td>&nbsp;
				<input name="gradeTermScores" id="gradeTermScore${item.gradeItemId}" class="easyui-numberspinner" min="0" max="${item.gradeTermPoint}" required="true" style="width:50px;" value="${item.gradeTermPoint}"></input>
			    </td>
			    <td width="200px"><%@ include	 file="deal-panel-score.jsp"%>&nbsp;</td>
				<td><c:out value='${item.gradeExplain}'/>&nbsp;</td>
			  </tr>
		  	  </c:forEach>
		  </tbody>
		</table>
	</div>
</c:if>
</div>
<div title="工单设置" style="padding:20px;" icon="icon-save">
工单是否保密：<s:radio list="%{@tx.bj12320.model.enums.BooleanEnum@toMap()}" key="isSecret"   theme="simple"/><br><br>
工单是否加急：<s:radio list="%{@tx.bj12320.model.enums.BooleanEnum@toMap()}" key="isEmergency"   theme="simple"/>
</div>
</c:if>
<div title="环节意见" style="padding:20px;" icon="icon-save">
<s:textarea label="环节意见" rows="8" cols="60" key="activityInfo.opin"  cssClass="" required="false" theme="xhtml"></s:textarea>
</div>
<c:if test="${model.currActName=='dccl' || model.currActName=='jbmcb' }">
<div title="工单附件" style="padding:20px;" icon="icon-save">
	工单附件名称：<s:textfield key="attaName"  cssClass="required" required="false" /><br /><br />
	工单附件：<s:file  key="attaFile"   theme="simple"/>
</div>
</c:if>
<c:if test="${model.currSysUserType!='BJ12320'}">
<div title="工单延时申请" style="padding:20px;" icon="icon-save">
申请工单延时天数：<input name="delayDays" id="delayDays" class="easyui-numberspinner" min="0" required="true" style="width:50px;" value="${ model.delayDays}"></input><br/><br/>
申请工单延时原因：<s:textarea rows="8" cols="60"  key="delayReason"  cssClass="required" required="false" theme="simple" ></s:textarea><br/><br/>
<input type="button" value="申请工单延时" onclick="applyWorkOrderDelay();"/>
</div>
</c:if>

<c:if test="${model.currActName=='bzcs'}">

<div title="北京12320工单质检记录单" style="padding:0px;" icon="icon-save">
<div class="gridTable">
		<table width="100%"  border="0" cellspacing="0" class="gridBody">
		  <thead>
			  <tr>
				<th sortColumn="IS_ADMINISTRATOR" >考核项目</th>
				<th sortColumn="IS_ADMINISTRATOR" >考核内容</th>
				<th sortColumn="STATUS" >错误性质</th>
				<th sortColumn="STATUS" >判定结果</th>
				<th sortColumn="STATUS" >备注</th>
			 </tr>
		  </thead>
		  <tbody>
		  	  <c:forEach items="${qcRecords}" var="item" varStatus="status">
			  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
				<td><c:out value='${item.projectAppraisal}'/>&nbsp;<input type="hidden" name="workOrderQcRecords[${status.count-1 }].projectAppraisal" value="${item.projectAppraisal}"/></td>
				<td><c:out value='${item.assessmentContent}'/>&nbsp;<input type="hidden" name="workOrderQcRecords[${status.count-1 }].assessmentContent" value="${item.assessmentContent}"/></td>
				<td>${item.errorProperties } <input type="hidden" name="workOrderQcRecords[${status.count-1 }].errorProperties" value="${item.errorProperties}"/></td>
			    <td>${item.decisionOutcome }
			   <select name="workOrderQcRecords[${status.count-1 }].decisionOutcome">
    <option value="合格">合格</option>
    <option value="不合格">不合格</option>
</select>

			    </td>
				<td>${item.remarks } <input  name="workOrderQcRecords[${status.count-1 }].remarks" value="${item.remarks}" size="10"/>
				<input type="hidden" name="workOrderQcRecords[${status.count-1 }].tszbProcessInfoId" value="${model.tszbProcessInfoId }"/>
				</td>
			  </tr>
		  	  </c:forEach>
		  </tbody>
		</table>
	</div>
	<s:textarea label="工单问题" rows="4" cols="50" key="qcWorkOrderProblem"  cssClass="" required="false" theme="xhtml"></s:textarea>
	是否通过：<s:radio list="%{@tx.bj12320.model.enums.BooleanEnum@toMap()}" key="qcIsPass"   theme="simple"/>
</div>
</c:if>
</div>

	<input type="hidden" name="isPass" id="isPass" value="true"/>
	<input type="hidden" name="isApprove" id="isApprove" value="true"/>
<c:if test="${model.currActName=='jllyff' }">
	选择承办部门：<s:select  list="#orgInfoManager.findDepartments(model.orgInfoId)"   key="chengbanOrgInfoId"  listKey="orgInfoId" listValue="orgName"  theme="simple"/>
</c:if>

<br>
<span style='font-size:12.0pt;font-family:宋体;font-weight:bold'>
上一环节提交人：${model.lastOperateUserInfo.realName }<br>
<c:if test="${not empty activityInfo }"></c:if>
上一环节意见：${ activityInfo.opin}
</span>
<br>

<c:if test="${model.currActName=='bzcs' || model.currActName=='xtdbsh' || model.currActName=='zgzrsd'|| model.currActName=='xtdbff'}">
		<input type="hidden" name="isReject" id="isReject" value="0"/>
        <s:select  list="#dataDictManager.findAllByDdType('TSZB__REJECT_REASON')"   key="rejectReason"  listKey="ddName" listValue="ddName"  theme="simple" headerKey=""  headerValue="请选择工单报废原因..."/>
        <input type="button" value="工单报废" onclick="reject();"/><br><br>
</c:if>

<c:if test="${model.currActName=='xtdbgd'}">
        <s:select  list="#dataDictManager.findAllByDdType('TSZB__DEFINE_ALCY')"   key="workOrderDefine"  listKey="ddName" listValue="ddName"  theme="simple" headerKey=""  headerValue="请选择工单定义-案例采用..."/>
</c:if>

<c:if test="${model.currActName!='bzcs' && model.currActName!='xtdbff'}">
		<input type="button" value="<<退回上一环节" onclick="backProcess();"/>
</c:if>

<c:if test="${model.currActName=='xtdbff'}">
	<script>

	$(function() {

		$( "#orgInfoLable" ).autocomplete({
		source: function( request, response ) {
				$.post( "${ctx }/pages/OrgInfo/outOrgInfo.do", {
					term:  request.term
				}, response );
			},
		minLength: 2,
		select: function( event, ui ) {
			$("#orgInfoId").val(ui.item.orgInfoId);
		}
	});

});

	</script>
<input type="hidden" name="orgInfoId" value="${orgInfoId}" id="orgInfoId"/>
	此工单将实际分发到： <input type="text" name="orgInfoLable" id="orgInfoLable" class="required"  value="${orgInfoLable }" size="100"><br/><br/>
</c:if>

		<input id="submitButton" name="submitButton" type="submit" value="当前环节办理完成>>" />

</c:if>
</div>
<c:if test="${model.currSysUserType=='BJ12320'}">
<div id="diffDialog" resizable="true" class="easyui-dialog" icon="icon-search" style="padding:5px;width:700px;height:500px;overflow:false;" closed="true" modal="true" title="内容痕迹对比" >
<TEXTAREA ID="text1" STYLE="width: 100%" ROWS=8>${activityInfo.incomingCallContentBak }</TEXTAREA>

<TEXTAREA ID="text2" STYLE="width: 100%" ROWS=8>${activityInfo.incomingCallContent }</TEXTAREA>
<DIV ID="outputdiv"></DIV>
</div>
</c:if>